/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale   1;

// Basin
x0 0;
x1 1;
y0 0;
y1 1;
z0 0;
z1 1;

// Inlet
x2 -0.3;
x3 0;
y2 0.35;
y3 0.65;
z2 0.6;
z3 0.9;

// Outlet
x4 1;
x5 1.3;
y4 0.35;
y5 0.65;
z4 0.1;
z5 0.4;


vertices
(
    // Basin
    ($x0 $y0 $z0)
    ($x1 $y0 $z0)
    ($x1 $y1 $z0)
    ($x0 $y1 $z0)
    ($x0 $y0 $z1)
    ($x1 $y0 $z1)
    ($x1 $y1 $z1)
    ($x0 $y1 $z1)

    // Inlet
    ($x2 $y2 $z2)
    ($x3 $y2 $z2)
    ($x3 $y3 $z2)
    ($x2 $y3 $z2)
    ($x2 $y2 $z3)
    ($x3 $y2 $z3)
    ($x3 $y3 $z3)
    ($x2 $y3 $z3)

    // Outlet
    ($x4 $y4 $z4)
    ($x5 $y4 $z4)
    ($x5 $y5 $z4)
    ($x4 $y5 $z4)
    ($x4 $y4 $z5)
    ($x5 $y4 $z5)
    ($x5 $y5 $z5)
    ($x4 $y5 $z5)
);

blocks
(
    hex (0 1 2 3 4 5 6 7)  (40 40 40) simpleGrading (1 1 1)
    hex (8 9 10 11 12 13 14 15)  (12 12 12) simpleGrading (1 1 1)
    hex (16 17 18 19 20 21 22 23)  (12 12 12) simpleGrading (1 1 1)
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (8 12 15 11)
        );
    }

    outlet
    {
        type patch;
        faces
        (
            (17 18 22 21)
        );
    }

    walls
    {
        type patch;
        faces
        (
            // Basin
            (0 3 2 1)
            (0 1 5 4)
            (2 3 7 6)

            // Inlet
            (8 11 10 9)
            (8 9 13 12)
            (10 11 15 14)
            (12 13 14 15)

            // Outlet
            (16 19 18 17)
            (16 17 21 20)
            (18 19 23 22)
            (20 21 22 23)
        );
    }

    atmosphere
    {
        type patch;
        faces
        (
            (4 5 6 7)
        );
    }

    inletRightPatch
    {
        type patch;
        faces
        (
            (9 10 14 13)
        );
    }

    basinLeftPatch
    {
        type patch;
        faces
        (
            (0 4 7 3)
        );
    }

    outletLeftPatch
    {
        type patch;
        faces
        (
            (16 20 23 19)
        );
    }

    basinRightPatch
    {
        type patch;
        faces
        (
            (1 2 6 5)
        );
    }
);

edges
(
);

mergePatchPairs
(
    (inletRightPatch basinLeftPatch)
    (outletLeftPatch basinRightPatch)
);

// ************************************************************************* //
